Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use more generics, less trailing whitespace in the dataverse package (#775) #2422

Closed
wants to merge 1 commit into from

Conversation

bencomp
Copy link
Contributor

@bencomp bencomp commented Jul 30, 2015

  • Use diamond operators or explicitly typed Lists or Maps.
  • Use typed queries, don't use casts when unnecessary.
  • Make ingestableAsTabular(DataFile dataFile) return false when the input is null (instead of "unknown"/"other").
  • Add Javadoc to getFileAccessRequesters.
  • Turn some comments into javadoc by adding that extra asterisk.
  • Remove trailing whitespace using Netbeans.
  • Remove some preceding whitespace manually.

It really looks more scary than it is.

@scolapasta
Copy link
Contributor

@landreev can you review this pull request, in particular the are around:
Make ingestableAsTabular(DataFile dataFile) return false when the input is null (instead of "unknown"/"other").

@scolapasta scolapasta added this to the 4.2 milestone Aug 3, 2015
bencomp added a commit to bencomp/dataverse that referenced this pull request Aug 23, 2015
This adds test expecting that `null` DataFiles, DataFiles without content type
and DataFiles with a bogus content type (`"foo/bar"`) are *not* classed as files
of types that Dataverse handles in specific ways. Also, for these files the tests
expect that no thumbnail can be generated.

In my PR IQSS#2422 I changed the behaviour of `DataFileServiceBean.getFileClass` to
return `null` when the input is `null`. This is still discussed, so I don't test for
this behaviour. The same goes for `DataFileServiceBean.ingestableAsTabular`; this
method is not tested at all at the moment.

To make the tests pass, I changed the `isSpssPorFile` and `isSpssSavFile` methods
to return `false` when the input is `null`. Hopefully this makes sense to you too :)

@scolapasta, @landreev and @michbarsinai, I'll happily discuss these suggestions.
@scolapasta scolapasta modified the milestones: 4.3, 4.2 Sep 17, 2015
@pdurbin
Copy link
Member

pdurbin commented Oct 29, 2015

@bencomp as discussed at #2478 this pull request has been made against an old branch (4.2) that should not receive any more commits. There's no way to switch the branch so I have to close the pull request. Sorry.

@pdurbin pdurbin closed this Oct 29, 2015
bencomp added a commit to bencomp/dataverse that referenced this pull request Jan 14, 2016
This adds test expecting that `null` DataFiles, DataFiles without content type
and DataFiles with a bogus content type (`"foo/bar"`) are *not* classed as files
of types that Dataverse handles in specific ways. Also, for these files the tests
expect that no thumbnail can be generated.

In my PR IQSS#2422 I changed the behaviour of `DataFileServiceBean.getFileClass` to
return `null` when the input is `null`. This is still discussed, so I don't test for
this behaviour. The same goes for `DataFileServiceBean.ingestableAsTabular`; this
method is not tested at all at the moment.

To make the tests pass, I changed the `isSpssPorFile` and `isSpssSavFile` methods
to return `false` when the input is `null`. Hopefully this makes sense to you too :)

@scolapasta, @landreev and @michbarsinai, I'll happily discuss these suggestions.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants